import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/10 21:34
 * @description 一只青蛙一次可以跳1级台阶和两级台阶，求该青蛙跳上一个n级台阶总共有多少中跳法
 *  dp[i] = dp[i-1] + dp[i-2]， dp[0] = 1, dp[1] = 1, dp[2] = 2;
 */
public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int N = sc.nextInt();
            int a = 1, b = 2, c = 0;
            if (N <= 2) {
                System.out.println(N);
            }else {
                for (int i = 3; i <= N ; i++) {
                    c = a + b;
                    a = b;
                    b = c;
                }
                System.out.println(c);
            }
        }
    }
}
